package forum.client.ui;

import java.util.Observable;
import java.util.Observer;

import forum.client.ui.events.UsersListEvent;

public class UsersListObserver implements Observer{
	private UsersListHandlerInt listHandler;

	public UsersListObserver(UsersListHandlerInt handler){
		this.listHandler=handler;
	}

	/* (non-Javadoc)
	 * @see java.util.Observer#update(java.util.Observable, java.lang.Object)
	 *
	 */
	@Override
	public void update(Observable obs, Object o) {
		if (o != null && o instanceof UsersListEvent) {
			((UsersListEvent)o).respondToEvent(this.listHandler);
		}
	}
}
